<!DOCTYPE html>
<html lang="zh-cn">
<!--包含头部-->
{{include file="{{$smarty.const.APP_PATH}}Home/View/Public/header.html"}}
<body>
<div class="lefter">
    <div class="logo"><a href="/index"><img src="/images/logo.png" alt="后台管理系统" /></a></div>
</div>
<div class="righter nav-navicon" id="admin-nav">
    <div class="mainer">
        <!--导航-->
        {{include file="{{$smarty.const.APP_PATH}}Home/View/Public/nav.html"}}
        <div class="admin-bread">
            <span>您好，admin，欢迎您的光临。</span>
            <ul class="bread">
                <li><a href="/article/" class="icon-cog">年会</a></li>
                <li>文章管理</li>
            </ul>
        </div>
    </div>
</div>
<div class="admin">
    <form method="post" action="/article/index/article_delete_more_post">
        <div class="panel admin-panel">
            <div class="panel-head"><strong>文章列表</strong></div>
            <div class="padding border-bottom">
                <input class="button button-small checkall" name="checkall" checkfor="ids[]" value="全选" type="button">
                <!--<input type="button" class="button active button-small" value="文章列表" />-->
                <input type="button" class="button button-small border-green" value="新增文章" onclick="javascript:window.location.href='/article/index/article_add'"/>
                <!--<button class="button button-small border-red" type="submit">删除所选</button>-->
                <input type="button" class="button button-small border-red" value="删除所选" href="javascript:void(0);" onclick="{if(confirm('确认删除?')){submit();return true;}return false;}"/>
            </div>
            <table class="table table-hover">
                <tr>
                    <th width="60" style="text-align: center">选择</th>
                    <th width="120" style="text-align: center">分类</th>
                    <th width="*">缩略图</th>
                    <th width="*">标题</th>
                    <th width="200" style="text-align: center">时间</th>
                    <th width="100" style="text-align: center">是否显示</th>
                    <th width="100" style="text-align: center">操作</th>
                </tr>
                {{foreach from=$article_list item=i key=k}}
                <tr>
                    <td align="center">
                        <input name="ids[]" value="{{$i.article_id}}" type="checkbox">
                    </td>
                    <td align="center">{{$i.category_name}}</td>
                    <td>{{if $i.article_type==2}}{{if $i.article_thumb}}<img src="{{$smarty.const.WWW_URL}}{{$i.article_thumb}}" width="50" height="50">{{else}}<img src="{{$smarty.const.WAP_URL}}/templates/default/images/morentouxiang.png" alt="未知头像" width="50" height="50">{{/if}}{{/if}}</td>
                    <td>{{$i.article_title}}</td>
                    <td align="center">{{$i.article_add_time|date_format:'%Y-%m-%d %H:%M:%S'}}</td>
                    <td align="center">{{if $i.article_show==1}}<span class=" badge bg-green">显示</span>{{else}}<span class=" badge bg-red">隐藏</span>{{/if}}</td>
                    <td>
                        <a class="button border-blue button-little" href="/article/index/article_edit/{{$i.article_id}}">修改</a>
                        <a class="button border-red button-little" href="javascript:void(0);" onclick="{if(confirm('确认删除?')){window.location.href='/article/index/article_delete/{{$i.article_id}}';return true;}return false;}">删除</a>
                    </td>
                </tr>
                {{/foreach}}
            </table>
            <div class="panel-foot text-center">
                <ul class="pagination"><li><a href="/article">首页</a></li></ul>
                {{if $pager.current_page>$pager.last_page}}
                <ul class="pagination"><li><a href="/article/index/index/{{$pager.last_page}}">上一页</a></li></ul>
                {{/if}}
                <ul class="pagination pagination-group">
                    {{if $pager.current_page<=10&&$pager.page_total<=10}}
                    {{section name=loop loop=$pager.page_total}}
                    <li {{if $smarty.section.loop.index+1==$pager.current_page}}class="active"{{/if}}><a href="/article/index/index/{{$smarty.section.loop.index+1}}">{{$smarty.section.loop.index+1}}</a></li>
                    {{/section}}
                    {{else if $pager.current_page>10&&$pager.current_page+10<$pager.page_total}}
                    {{section name=loop loop=$pager.current_page+10 start=($pager.current_page/10)|string_format:"%d"*10}}
                    <li {{if $smarty.section.loop.index+1==$pager.current_page}}class="active"{{/if}}><a href="/article/index/index/{{$smarty.section.loop.index+1}}">{{$smarty.section.loop.index+1}}</a></li>
                    {{/section}}
                    {{else if $pager.current_page>10&&$pager.current_page+10>$pager.page_total}}
                    {{section name=loop loop=$pager.page_total start=($pager.current_page/10)|string_format:"%d"*10}}
                    <li {{if $smarty.section.loop.index+1==$pager.current_page}}class="active"{{/if}}><a href="/article/index/index/{{$smarty.section.loop.index+1}}">{{$smarty.section.loop.index+1}}</a></li>
                    {{/section}}
                    {{else}}
                    {{section name=loop loop=10}}
                    <li {{if $smarty.section.loop.index+1==$pager.current_page}}class="active"{{/if}}><a href="/article/index/index/{{$smarty.section.loop.index+1}}">{{$smarty.section.loop.index+1}}</a></li>
                    {{/section}}
                    {{/if}}
                </ul>
                {{if $pager.current_page<$pager.next_page}}
                <ul class="pagination"><li><a href="/article/index/index/{{$pager.next_page}}">下一页</a></li></ul>
                <ul class="pagination"><li><a href="/article/index/index/{{$pager.page_total}}">尾页</a></li></ul>
                {{/if}}
            </div>
        </div>
    </form>
    <br />
    <!--包含底部-->
    {{include file="{{$smarty.const.APP_PATH}}Home/View/Public/footer.html"}}
</div>
<div class="hidden"><script src="#" language="JavaScript"></script></div>
</body>
</html>